<div class="path"><a href="./" title="">HOME</a> &nbsp;&nbsp;&gt;&nbsp;&nbsp; <a href="./?category=<?php echo $this->products['category']; ?>" title="<?php echo $this->products['categoryName']; ?>"><?php echo $this->products['categoryName']; ?></a> &nbsp;&nbsp;&gt;&nbsp;&nbsp; <?php echo $this->products['name']; ?></div>
<div class="search">
<form action="search_result.html" method="post" name="searchform">
<p>
<input type="text" name="product_keyword" value="SEARCH A PRODUCT" onfocus="if (this.value == 'SEARCH A PRODUCT') {this.value = '';}" onblur="if (this.value == ''){this.value = 'SEARCH A PRODUCT'; }" class="text" /><input type="submit" name="submit" value="Search" class="submit" />
<input type="hidden" value="action" name="form_filter"/>
<input type="hidden" value="all" name="ads_category"/>
<input type="hidden" value="all" name="ads_brand"/>
<input type="hidden" value="all" name="ads_colour"/>
<input type="hidden" value="all" name="ads_size"/>
<input type="hidden" value="all" name="ads_price"/>
</p>
</form>
</div>
<div id="product_detail">
		<form name="productform" method="post" action="product.html?category=<?php echo $this->products['category']; ?>&id=<?php echo $this->products['id']; ?>#product_detail">
		<input type="hidden" value="addtocart" name="FORM_SUBMIT"/>
		<input type="hidden" value="<?php echo $this->products['id']; ?>" name="id"/>
		<input type="hidden" value="<?php echo $this->products['skuid']; ?>" name="skuid"/>
		<input type="hidden" value="<?php echo $this->products['name']; ?>" name="prodcut_name"/>
		<input type="hidden" value="<?php echo $this->products['price']; ?>" name="price"/>
		<input type="hidden" value="<?php echo $this->colour; ?>" name="colour"/>
		<input type="hidden" value="<?php echo $this->products['colour_ids']; ?>" name="colour_ids"/>
		<input type="hidden" value="<?php echo $this->products['size_ids']; ?>" name="size_ids"/>
		<div class="gallery">
			<?php if ($this->tagIDs): ?>
			<p class="more">
				<?php foreach ($this->tagIDs as $key=>$strTagIDs): ?>
					<a href="./?tag=<?php echo $key; ?>" title="View more <?php echo $strTagIDs['tag']; ?>">View more <?php echo $strTagIDs['tag']; ?></a> <?php if ($key < count($this->tagIDs) - 1): ?> | <?php endif; ?>
				<?php endforeach; ?>
			</p>
				
			<?php endif; ?>
			<div class="pic">
				<a href="<?php echo $this->colourPath; ?>big/1.jpg" class="jqzoom" id="bImg" title="<?php echo $this->products['name']; ?>"><img src="<?php echo $this->colourPath; ?>1.jpg"  id="mImg" title="<?php echo $this->products['name']; ?>"></a>
			</div>
			<ul class="thumb">
				<?php for ($i=1; $i<=4; $i++) { 
						$filename = $this->colourPath . $i . ".jpg";
				?>
				<?php if (file_exists($filename)): ?>
				<li>
					<a href="#" onClick="selectedPic('<?php echo $i; ?>', '<?php echo $this->colourPath; ?>');return false;" title="">
						<img src="image.php?src=<?php echo $filename; ?>&width=93&height=93" alt="'.$objRd['name'].'"/></a></li>
				<?php endif; ?>
				<?php } ?>
			</ul>
			<a href="Tell_friend.html" title="Tell Friend" class="tell_friend iframe2">Tell Friend</a>
			<div class="path"><a href="./" title="">HOME</a> &nbsp;&nbsp;&gt;&nbsp;&nbsp; <a href="./?category=<?php echo $this->products['category']; ?>" title="<?php echo $this->products['categoryName']; ?>"><?php echo $this->products['categoryName']; ?></a> &nbsp;&nbsp;&gt;&nbsp;&nbsp; <?php echo $this->products['name']; ?></div>
		</div>
		<div class="property">
			<h2><?php echo $this->products['name']; ?></h2>
			<span class="order"><?php echo $this->products['skuid']; ?></span>
			<span class="price">RMB<?php echo $this->products['price']; ?></span>
			<?php echo $this->products['description']; ?>
			<div class="product_extra">
				<div id="tool">
					<script type="text/javascript">
					jQuery(function(){
						jQuery("#slip").click(function(){
							
							jQuery.ajax({
								 type: "POST",
								 url: "saveBackPocket.php",
								 data: "catalogid=" + jQuery("input[@name='id']").val() + "&size=" + jQuery("select[@name='size']").val() + "&color=" + jQuery("input[@name='colour']").val(),
								 success: function(msg){ 
									//alert( "Data Saved: " +   msg );
									if (msg == 'true')
									{
										alert("Backpocket added successfully!");
									}
									else
									{
										window.location = "sign-in.html";
									}
								} 
							}); 
								
							return false;
						});
						
						jQuery("select[@name=\'size\']").change(function(){
							var url = window.location.href;
							if (url.indexOf("#product_detail") > -1)
							{
								if (url.indexOf("&id_size=") > -1)
									url = url.substring(0, url.indexOf("&id_size="));
								else
									url = url.substring(0, url.indexOf("#product_detai"));
							}
							
							if (url.indexOf("?") > -1)
								window.location.href = url + "&id_size=" + jQuery("select[@name=\'size\']").val() + "#product_detail";
							else
								window.location.href = url + "?id_size=" + jQuery("select[@name=\'size\']").val() + "#product_detail";
						});
					});
				</script>
				<a href="#" title="" id="slip">SLIP IN WISHLIST</a> <a href="#" title="" id="share_this_product">SHARE THIS PRODUCT</a>
				</div>
				<p class="select_color"><strong>SELECT COLOR</strong>: 
				<?php for ($i=0; $i<count($this->colourIDs); $i++){ 
						$key  = $this->colourIDs[$i];
				?>
					<a href="today.html?category=<?php echo $this->products['category']; ?>&id=<?php echo $this->products['id']; ?>&id_colour=<?php echo $key; ?>#product_detail">
						<img src="<?php echo $this->colours[$key]['img']; ?>" alt="<?php echo $this->colours[$key]['title']; ?>" />
					</a>
				<?php } ?>
				</p>
				<p class="skin">
					<label><strong>SIZE</strong>: <select id="size" name="size">
							<option value="">- SELECT SIZE -</option>
							<?php for ($i=0; $i<count($this->sizeIDs); $i++) {
									$key = $this->sizeIDs[$i];
							?>
							<option value="<?php echo $key; ?>"<?php if ($this->size == $key): ?> selected="selected"<?php endif; ?>><?php echo $this->sizes[$key]['size']; ?></option>
							<?php } ?>		
						</select>
					</label>
					<?php if (!is_null($this->currentStock)): ?>
					<?php if (intval($this->currentStock) > 0): ?>
					<label><strong>QUANTITY</strong>: <select id="quantity" name="quantity">
					<?php if (intval($this->currentStock) >= 10): ?>				
							<option value="1" selected="selected">1</option>
							<option value="2">2</option>
							<option value="3">3</option>
							<option value="4">4</option>
							<option value="5">5</option>
							<option value="6">6</option>
							<option value="7">7</option>
							<option value="8">8</option>
							<option value="9">9</option>
							<option value="10">10</option>
					<?php else: ?>
					<?php for ($i=1;$i<=intval($this->currentStock);$i++)
						{
					?>
							<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
					<?php
						}
					?>
					<?php endif; ?>
					</select></label>
					<?php endif; ?>
					<?php endif; ?>
				</p>
				<p class="size_chart"><img src="images/icon_size_chart.gif" alt="" /> <a href="Size_chart.html" class="iframe3" title="size char">size chart</a></p>
				<p class="wrapping"><input type="checkbox" name="checkbox" id="" /> I want <a href="" title="" class="wrapping_link"><?php echo $this->products['gwTitle']; ?></a> <?php echo $this->products['gwPrice']; ?></p>
				<p class="submits"><a href="#" onclick="javascript:document.productform.submit();return false;" title="ADD TO CART" class="addcart">ADD TO CART</a><a href="./shoppingcart.html" title="CHECKOUT" class="checkout">CHECKOUT</a></p>

				<div id="gift_wrapping" class="none">
					<span class="icon_tip"></span>
					<img src="<?php echo $this->products['gwImg']; ?>" alt="<?php echo $this->products['gwTitle']; ?>" />
				</div> <!-- gift_wrapping end -->
				<div id="share_product" class="none">
					<div class="cons">
						<span class="icon_tip"></span>
						<ul>
							<li><a href="#" title="Facebook"><img src="images/sociable/share_facebook.gif" alt="Facebook" /></a></li>
							<li><a href="#" title="Twitter"><img src="images/sociable/share_twitter.gif" alt="Twitter" /></a></li>
							<li><a href="#" title="Delicious"><img src="images/sociable/share_delicious.gif" alt="Delicious" /></a></li>
							<li><a href="#" title="Digg"><img src="images/sociable/share_digg.gif" alt="Digg" /></a></li>
							<li><a href="#" title="E-mail"><img src="images/sociable/icon_email.gif" alt="E-mail" /></a></li>
						</ul>
					</div>
				</div> <!-- share_product end -->
			</div> <!-- product_extra end -->
		</form>
		</div> <!-- property end -->
	</div> <!-- product_detail end -->